<html>
<head>
<title>ZFS Message ID: ZFS-8000-K4</title>
</head>
<body>
<!--
 Copyright 2007 Sun Microsystems, Inc.  All rights reserved.
 Use is subject to license terms.
-->
<!--
 CDDL HEADER START

 The contents of this file are subject to the terms of the
 Common Development and Distribution License (the "License").
 You may not use this file except in compliance with the License.

 You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
 or http://www.opensolaris.org/os/licensing.
 See the License for the specific language governing permissions
 and limitations under the License.

 When distributing Covered Code, include this CDDL HEADER in each
 file and include the License file at usr/src/OPENSOLARIS.LICENSE.
 If applicable, add the following below this CDDL HEADER, with the
 fields enclosed by brackets "[]" replaced with your own identifying
 information: Portions Copyright [yyyy] [name of copyright owner]

 CDDL HEADER END
-->
<!-- start: templates/success -->
<!-- ident	"@(#)success	1.4	07/03/02 SMI" -->
Article for Message ID:&nbsp;&nbsp; <font size="+1"><tt><b>ZFS-8000-K4</b></tt></font>
<br><br>
<hr>
<br><br>
<!-- end: templates/success -->
<!-- start: article -->
<!-- code: ZFS-8000-K4 -->
<!-- keys: fault.fs.zfs.log_replay -->
<table width="80%"><tr><td>
<b>ZFS intent log read failure</b>
<p>
<dl>
<dt><p><b>Type</b>
<dd>Error
<dt><p><b>Severity</b>
<dd>Major
<dt><p><b>Description</b>
<dd>A ZFS intent log device could not be read.
<dt><p><b>Automated Response</b>
<dd>No automated response will be taken.
<dt><p><b>Impact</b>
<dd>The intent log(s) cannot be replayed.
<dt><p><b>Suggested Action for System Administrator</b>
<dd>
<p>
A ZFS intent log record could not be read due to an error.  This may be due to
a missing or broken log device, or a device within the pool may be
experiencing I/O errors.
The pool itself is not corrupt but is missing some pool changes
that happened shortly before a power loss or system failure.
These are pool changes that applications had
requested to be written synchronously but had not been committed
in the pool. This transaction group commit currently occurs every
five seconds, and so typically at most five seconds worth of
synchronous writes have been lost.
ZFS itself cannot determine if the pool changes lost are critical
to those applications running at the time of the system failure.
This is a decision the administrator must make.
You may want to consider mirroring log devices.
First determine which pool is in error:
</p>

<pre>
# zpool status -x
  pool: test
 state: FAULTED
status: One or more of the intent logs could not be read.
        Waiting for adminstrator intervention to fix the faulted pool.
action: Either restore the affected device(s) and run 'zpool online',
        or ignore the intent log records by running 'zpool clear'.
 scrub: none requested
config:

        NAME              STATE     READ WRITE CKSUM
        test              FAULTED      0     0     0  bad intent log
          c3t2d0          ONLINE       0     0     0
        logs              FAULTED      0     0     0  bad intent log
          c5t3d0          UNAVAIL      0     0     0  cannot open
</pre>


There are two courses of action to resolve this problem.
</p>

<p>
If the validity of the pool from an application perspective requires
the pool changes then the log devices must be recovered.  Make sure
power and cables are connected and that the affected device is online.
Then run 'zpool online' and then 'zpool clear':
</p>

<pre>
# zpool online test c5t3d0
# zpool clear test
# zpool status test
  pool: test
 state: ONLINE
 scrub: none requested
config:

        NAME              STATE     READ WRITE CKSUM
        test              ONLINE       0     0     0
          c3t2d0          ONLINE       0     0     0
        logs              ONLINE       0     0     0
          c5t3d0          ONLINE       0     0     0

errors: No known data errors
</pre>

<p>
The second alternative action is to ignore the most recent pool
changes that could not be read. To do this run 'zpool clear':
</p>

<pre>
# zpool clear test
# zpool status test
  pool: test
 state: DEGRADED
status: One or more devices could not be opened.  Sufficient replicas exist for
        the pool to continue functioning in a degraded state.
action: Attach the missing device and online it using 'zpool online'.
   see: https://zfsonlinux.org/msg/ZFS-8000-2Q
 scrub: none requested
config:

        NAME              STATE     READ WRITE CKSUM
        test              DEGRADED     0     0     0
          c3t2d0          ONLINE       0     0     0
        logs              DEGRADED     0     0     0
          c5t3d0          UNAVAIL      0     0     0  cannot open

errors: No known data errors
</pre>

<p>
    Future log records will not use a failed log device but will be written
    to the main pool.  You should fix or replace any failed log devices.
</p>

	
<dt><p><b>Details</b>
<dd>The Message ID: <tt>ZFS-8000-K4</tt> indicates that
	    a log device is missing or cannot be read. 
</dl>
</td></tr></table>
<!-- end: article -->
</body>
</html>
